﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ChangeACL.aspx.cs" Inherits="ExamAnalysis.Manage.ChangeACL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
   <style type="text/css">
        .list-item {
            font:normal 11px tahoma, arial, helvetica, sans-serif;
            padding:3px 10px 3px 10px;
            border:1px solid #fff;
            border-bottom:1px solid #eeeeee;
            white-space:normal;
            color:#555;
        }
        
        .list-item h3 {
            display:block;
            font:inherit;
            font-weight:bold;
            margin:0px;
            color:#222;
        }
    </style>
    <table><tr valign="top"><td  valign="top"> <img src="../Images/main/button-rights.jpg" style="margin:10px;" align="top" /></td><td>
<asp:LinqDataSource ID="LinqDataSource1" runat="server" 
        ContextTypeName="ExamAnalysis.Model.ExamAnalysisDataContext" EntityTypeName="" 
        Select="new (UserName)" TableName="aspnet_Users">
    </asp:LinqDataSource>
    <asp:LinqDataSource ID="LinqDataSource2" runat="server" 
        ContextTypeName="ExamAnalysis.Model.ExamAnalysisDataContext" EntityTypeName="" 
        Select="new (RoleName)" TableName="aspnet_Roles">
    </asp:LinqDataSource>
 <ext:TabPanel ID="TabPanel1" runat="server" Width="800" >
 <Items>
            <ext:Panel 
                ID="Tab1"
                runat="server" 
                Title="<span>用户权限控制</span>"
                AutoHeight="true"
                BodyPadding="10"
                Icon="UserKey">
                <Items>
                  <ext:Portal ID="Portal1" 
                        runat="server" >
                        <Items>
                            <ext:PortalColumn ID="PortalColumn1" 
                                runat="server"  >
                                <Items>
                                    <ext:Portlet ID="Portlet2" runat="server" Title="添加" Icon="New"  Height="200" Closable="False">
                                        <Items>
                                        <ext:Panel runat="server" AutoHeight="true">
                                        <Items>
                                            <ext:ComboBox ID="ComboBox1" 
                                                runat="server"
                                                Width="350"
                                                Editable="false"
                                                DisplayField="UserName"
                                                ValueField="UserName"
                                                TypeAhead="true" 
                                                QueryMode="Local"
                                                ForceSelection="true"
                                                TriggerAction="All"
                                                EmptyText="选择一个用户"
                                                SelectOnFocus="true" MaxWidth="350">                        
                                            <Store>
                                                <ext:Store ID="Store1" runat="server" DataSourceID="LinqDataSource1">
                                                    <Model>
                                                        <ext:Model ID="Model2" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="UserName" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>            
                                                </ext:Store>
                                            </Store>
                                            <ListConfig>
                                                <ItemTpl ID="ItemTpl1" runat="server">
                                                    <Html>
						                                <div class="list-item">
							                                    <h3>{UserName}</h3>
						                                </div>
				                                    </Html>    
                                                </ItemTpl>
                                            </ListConfig>
                                        </ext:ComboBox> 
                                        <ext:ComboBox ID="ComboBox2" 
                                            HiddenName="ObjectID"
                                            runat="server"
                                            Width="350"
                                            Editable="false"
                                            DisplayField="ObjectName"
                                            ValueField="ObjectID"
                                            TypeAhead="true" 
                                            QueryMode="Local"
                                            ForceSelection="true"
                                            TriggerAction="All"
                                            EmptyText="选择一个对象"
                                            SelectOnFocus="true">                        
                                            <Store>
                                                <ext:Store ID="Store3" runat="server" >
                                                    <Model>
                                                        <ext:Model ID="Model3" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="ObjectID" />
                                                                <ext:ModelField Name="ObjectName" />
                                                                <ext:ModelField Name="ObjectType" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>            
                                                </ext:Store>
                                            </Store>
                                            <ListConfig>
                                                <ItemTpl ID="ItemTpl2" runat="server">
                                                    <Html>
						                                <div class="list-item">
							                                    <h3>{ObjectName}</h3>
                                                                {ObjectType}
						                                </div>
				                                    </Html>    
                                                </ItemTpl>
                                            </ListConfig>
                                        </ext:ComboBox>
                                        <ext:RadioGroup ID="RadioGroup1" 
                                                            runat="server"
                                                            Anchor="none"
                                                            >
                                                            <Items>
                                                                <ext:Radio ID="Radio1" 
                                                                    runat="server" 
                                                                    InputValue="strong" 
                                                                    BoxLabel="强权限" 
                                                                    Checked="true" />

                                                                <ext:Radio ID="Radio2" 
                                                                    runat="server" 
                                                                    InputValue="weak" 
                                                                    BoxLabel="弱权限" />
                                                            </Items>
                                                        </ext:RadioGroup>
                                                        <ext:CheckboxGroup runat="server">
                                                        <Items>
                                                          <ext:Checkbox ID="Checkbox1" 
                                                            runat="server"
                                                            Name="Create"
                                                            BoxLabel="添加"
                                                            HideLabel="true">
                                                        </ext:Checkbox>
                                                        <ext:Checkbox ID="Checkbox2" 
                                                            runat="server"
                                                            Name="Read"
                                                            BoxLabel="查看"
                                                            HideLabel="true">
                                                        </ext:Checkbox>
                                                        <ext:Checkbox ID="Checkbox3" 
                                                            runat="server"
                                                            Name="Update"
                                                            BoxLabel="修改"
                                                            HideLabel="true">
                                                        </ext:Checkbox>
                                                        <ext:Checkbox ID="Checkbox4" 
                                                            runat="server"
                                                            Name="Delete"
                                                            BoxLabel="删除"
                                                            HideLabel="true">
                                                        </ext:Checkbox>
                                                        </Items>
                                                        </ext:CheckboxGroup>    
                                                        <ext:Button  ID="Button1" runat="server" Width="80" OnDirectClick="Button1_Click" 
                                                        Text="添加" Icon="Add" />      
                                        </Items>
                                        </ext:Panel>
                                                        </Items>
                                                    </ext:Portlet>
                                                    <ext:Portlet ID="Portlet1" runat="server" Title="删除"  Closable="False" Icon="Delete">
                                                        <Items>
                                                            <ext:GridPanel ID="ACLInfoGridPanel" runat="server" Frame="true"  
                                                                Title="权限信息">
                                                                <Store>
                                                                    <ext:Store ID="Store2" runat="server">
                                                                        <Model>
                                                                            <ext:Model ID="Model1" runat="server" IDProperty="AclID">
                                                                                <Fields>
                                                                                    <ext:ModelField Name="ObjectName" />
                                                                                    <ext:ModelField Name="SubjectName" />
                                                                                    <ext:ModelField Name="ObjectType" />
                                                                                    <ext:ModelField Name="AclID" />
                                                                                    <ext:ModelField Name="Power" />
                                                                                </Fields>
                                                                            </ext:Model>
                                                                        </Model>
                                                                    </ext:Store>
                                                                </Store>
                                                                <ColumnModel>
                                                                       <Columns>
                                                                             <ext:Column ID="Column1" runat="server" DataIndex="SubjectName" Text="用户名" 
                                                                                                    Width="150" />
                                                                             <ext:Column ID="Column2" runat="server" DataIndex="ObjectName" Text="对象名" 
                                                                                                    Width="150" />
                                                                             <ext:Column ID="Column3" runat="server" DataIndex="ObjectType" Text="对象类型" 
                                                                                                    Width="150" />
                                                                             <ext:Column ID="Column7" runat="server" DataIndex="Power" Text="权限" 
                                                                                                    Width="50" />
                                                                       </Columns>
                                                                 </ColumnModel>
                                                                <SelectionModel>
                                                                    <ext:RowSelectionModel ID="RowSelectionModel3" runat="server" Mode="Single" />
                                                                </SelectionModel>
                                                                <BottomBar>
                                                                    <ext:Toolbar ID="Toolbar6" runat="server">
                                                                        <Items>
                                                                            <ext:Button ID="Button4" runat="server" OnDirectClick="Button4_Click" 
                                                                                Text="删除选中权限" Icon="Accept" />
                                                                        </Items>
                                                                    </ext:Toolbar>
                                                                </BottomBar>
                                                            </ext:GridPanel>  
                                                        </Items>
                                                    </ext:Portlet>
                                                </Items>
                                            </ext:PortalColumn>                                  
                                        </Items>
                                    </ext:Portal>
                                    </Items>      
                                </ext:Panel>
                                <ext:Panel
                                    ID="Tab2"
                                    runat="server" 
                                    Title="<span>职位权限控制</span>" 
                                    AutoHeight="true"
                                    BodyPadding="6" Icon="Server">
                                    <Items>
                                      <ext:Portal ID="Portal2" 
                                        runat="server" >
                                        <Items>
                                            <ext:PortalColumn ID="PortalColumn2" 
                                                runat="server"  >
                                                <Items>
                                                    <ext:Portlet ID="Portlet3" runat="server" Title="添加" Icon="New"  Height="200" Closable="False">
                                                        <Items>
                                                        <ext:Panel ID="Panel1" runat="server" AutoHeight="true">
                                                        <Items>
                                                            <ext:ComboBox ID="ComboBox3" 
                                                            runat="server"
                                                            Width="350"
                                                            Editable="false"
                                                            DisplayField="RoleName"
                                                            ValueField="RoleName"
                                                            TypeAhead="true" 
                                                            QueryMode="Local"
                                                            ForceSelection="true"
                                                            TriggerAction="All"
                                                            EmptyText="选择一个职位"
                                                            SelectOnFocus="true" MaxWidth="350">                        
                                                            <Store>
                                                                <ext:Store ID="Store4" runat="server" DataSourceID="LinqDataSource2">
                                                                    <Model>
                                                                        <ext:Model ID="Model4" runat="server">
                                                                            <Fields>
                                                                                <ext:ModelField Name="RoleName" />
                                                                            </Fields>
                                                                        </ext:Model>
                                                                    </Model>            
                                                                </ext:Store>
                                                            </Store>
                                                            <ListConfig>
                                                                <ItemTpl ID="ItemTpl3" runat="server">
                                                                    <Html>
						                                                <div class="list-item">
							                                                    <h3>{RoleName}</h3>
						                                                </div>
				                                                    </Html>    
                                                                </ItemTpl>
                                                            </ListConfig>
                                                        </ext:ComboBox> 
                                                        <ext:ComboBox ID="ComboBox4" 
                                                            HiddenName="ObjectID"
                                                            runat="server"
                                                            Width="350"
                                                            Editable="false"
                                                            DisplayField="ObjectName"
                                                            ValueField="ObjectID"
                                                            TypeAhead="true" 
                                                            QueryMode="Local"
                                                            ForceSelection="true"
                                                            TriggerAction="All"
                                                            EmptyText="选择一个对象"
                                                            SelectOnFocus="true">                        
                                                            <Store>
                                                                <ext:Store ID="Store5" runat="server" >
                                                                    <Model>
                                                                        <ext:Model ID="Model5" runat="server">
                                                                            <Fields>
                                                                                <ext:ModelField Name="ObjectID" />
                                                                                <ext:ModelField Name="ObjectName" />
                                                                                <ext:ModelField Name="ObjectType" />
                                                                            </Fields>
                                                                        </ext:Model>
                                                                    </Model>            
                                                                </ext:Store>
                                                            </Store>
                                                            <ListConfig>
                                                                <ItemTpl ID="ItemTpl4" runat="server">
                                                                    <Html>
						                                                <div class="list-item">
							                                                    <h3>{ObjectName}</h3>
                                                                                {ObjectType}
						                                                </div>
				                                                    </Html>    
                                                                </ItemTpl>
                                                            </ListConfig>
                                                        </ext:ComboBox>
                                                        <ext:RadioGroup ID="RadioGroup2" 
                                                                            runat="server"
                                                                            Anchor="none"
                                                                            >
                                                                            <Items>
                                                                                <ext:Radio ID="Radio3" 
                                                                                    runat="server" 
                                                                                    InputValue="strong" 
                                                                                    BoxLabel="强权限" 
                                                                                    Checked="true" />

                                                                                <ext:Radio ID="Radio4" 
                                                                                    runat="server" 
                                                                                    InputValue="weak" 
                                                                                    BoxLabel="弱权限" />
                                                                            </Items>
                                                                        </ext:RadioGroup>
                                                                        <ext:CheckboxGroup ID="CheckboxGroup1" runat="server">
                                                                        <Items>
                                                                          <ext:Checkbox ID="Checkbox5" 
                                                                            runat="server"
                                                                            Name="Create"
                                                                            BoxLabel="添加"
                                                                            HideLabel="true">
                                                                        </ext:Checkbox>
                                                                        <ext:Checkbox ID="Checkbox6" 
                                                                            runat="server"
                                                                            Name="Read"
                                                                            BoxLabel="查看"
                                                                            HideLabel="true">
                                                                        </ext:Checkbox>
                                                                        <ext:Checkbox ID="Checkbox7" 
                                                                            runat="server"
                                                                            Name="Update"
                                                                            BoxLabel="修改"
                                                                            HideLabel="true">
                                                                        </ext:Checkbox>
                                                                        <ext:Checkbox ID="Checkbox8" 
                                                                            runat="server"
                                                                            Name="Delete"
                                                                            BoxLabel="删除"
                                                                            HideLabel="true">
                                                                        </ext:Checkbox>
                                                                        </Items>
                                                                        </ext:CheckboxGroup>       
                                                                        <ext:Button ID="Button2" Icon="Add" runat="server" Width="80" OnDirectClick="Button2_Click" 
                                                                        Text="添加" />      
                                                        </Items>
                                                        </ext:Panel>
                                                        </Items>
                                                    </ext:Portlet>
                                                    <ext:Portlet ID="Portlet4" runat="server" Icon="Delete" Title="删除"  Closable="False">
                                                        <Items>
                                                            <ext:GridPanel ID="ACLInfoGridPanel2" runat="server" Frame="true" 
                                                                Title="权限信息">
                                                                <Store>
                                                                    <ext:Store ID="Store6" runat="server">
                                                                        <Model>
                                                                            <ext:Model ID="Model6" runat="server" IDProperty="AclID">
                                                                                <Fields>
                                                                                    <ext:ModelField Name="ObjectName" />
                                                                                    <ext:ModelField Name="SubjectName" />
                                                                                    <ext:ModelField Name="ObjectType" />
                                                                                    <ext:ModelField Name="AclID" />
                                                                                    <ext:ModelField Name="Power" />
                                                                                </Fields>
                                                                            </ext:Model>
                                                                        </Model>
                                                                    </ext:Store>
                                                                </Store>
                                                                <ColumnModel>
                                                                       <Columns>
                                                                             <ext:Column ID="Column4" runat="server" DataIndex="SubjectName" Text="职位名" 
                                                                                                    Width="150" />
                                                                             <ext:Column ID="Column5" runat="server" DataIndex="ObjectName" Text="对象名" 
                                                                                                    Width="150" />
                                                                             <ext:Column ID="Column6" runat="server" DataIndex="ObjectType" Text="对象类型" 
                                                                                                    Width="150" />
                                                                              <ext:Column ID="Column8" runat="server" DataIndex="Power" Text="权限" 
                                                                                                    Width="50" />
                                                                       </Columns>
                                                                 </ColumnModel>
                                                                <SelectionModel>
                                                                    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" Mode="Single" />
                                                                </SelectionModel>
                                                                <BottomBar>
                                                                    <ext:Toolbar ID="Toolbar1" runat="server">
                                                                        <Items>
                                                                            <ext:Button ID="Button3" runat="server" Icon="Accept" OnDirectClick="Button5_Click" 
                                                                                Text="删除选中权限" />
                                                                        </Items>
                                                                    </ext:Toolbar>
                                                                </BottomBar>
                                                            </ext:GridPanel>  
                                                        </Items>
                                                    </ext:Portlet>
                                                </Items>
                                            </ext:PortalColumn>                                  
                                        </Items>
                                    </ext:Portal>
                </Items>
            </ext:Panel>
            <ext:Panel
                                    ID="Panel2"
                                    runat="server" 
                                    Title="<span>目录控制</span>" 
                                    AutoHeight="true"
                                    BodyPadding="6" Icon="Group">
                                    <Items>
                                      <ext:Portal ID="Portal3" 
                                        runat="server" >
                                        <Items>
                                            <ext:PortalColumn ID="PortalColumn3" 
                                                runat="server"  >
                                                <Items>
                                                    <ext:Portlet ID="Portlet5" runat="server" Title="添加" Icon="New"  Height="200" Closable="False">
                                                        <Items>
                                                        <ext:Panel ID="Panel3" runat="server" AutoHeight="true">
                                                        <Items>
                                                            <ext:ComboBox ID="ComboBox5" 
                                                            runat="server"
                                                            Width="350"
                                                            Editable="false"
                                                            DisplayField="RoleName"
                                                            ValueField="RoleName"
                                                            TypeAhead="true" 
                                                            QueryMode="Local"
                                                            ForceSelection="true"
                                                            TriggerAction="All"
                                                            EmptyText="选择一个职位"
                                                            SelectOnFocus="true" MaxWidth="350">                        
                                                            <Store>
                                                                <ext:Store ID="Store7" runat="server" DataSourceID="LinqDataSource2">
                                                                    <Model>
                                                                        <ext:Model ID="Model7" runat="server">
                                                                            <Fields>
                                                                                <ext:ModelField Name="RoleName" />
                                                                            </Fields>
                                                                        </ext:Model>
                                                                    </Model>            
                                                                </ext:Store>
                                                            </Store>
                                                            <ListConfig>
                                                                <ItemTpl ID="ItemTpl5" runat="server">
                                                                    <Html>
						                                                <div class="list-item">
							                                                    <h3>{RoleName}</h3>
						                                                </div>
				                                                    </Html>    
                                                                </ItemTpl>
                                                            </ListConfig>
                                                        </ext:ComboBox> 
                                                                        <ext:CheckboxGroup ID="CheckboxGroup2" runat="server" ColumnsNumber="5">
                                                                        <Items>
                                                                          <ext:Checkbox ID="Checkbox9" 
                                                                            runat="server"
                                                                            Name="1"
                                                                             Width="90"
                                                                            BoxLabel="系统首页"
                                                                            HideLabel="true">
                                                                        </ext:Checkbox>
                                                                        <ext:Checkbox ID="Checkbox10" 
                                                                            runat="server"
                                                                            Name="2"
                                                                            Width="90"
                                                                            BoxLabel="成绩查询"
                                                                            HideLabel="true">
                                                                        </ext:Checkbox>
                                                                        <ext:Checkbox ID="Checkbox11" 
                                                                            runat="server"
                                                                            Name="3"
                                                                            Width="90"
                                                                            BoxLabel="数据录入"
                                                                            HideLabel="true">
                                                                        </ext:Checkbox>
                                                                        <ext:Checkbox ID="Checkbox12" 
                                                                            runat="server"
                                                                            Name="4"
                                                                            Width="90"
                                                                            BoxLabel="数据维护"
                                                                            HideLabel="true">
                                                                            </ext:Checkbox>
                                                                            <ext:Checkbox ID="Checkbox13" 
                                                                            runat="server"
                                                                            Name="5"
                                                                            Width="90"
                                                                            BoxLabel="成绩分析"
                                                                            HideLabel="true">
                                                                            </ext:Checkbox>
                                                                            <ext:Checkbox ID="Checkbox14" 
                                                                            runat="server"
                                                                            Name="6"
                                                                            Width="90"
                                                                            BoxLabel="帐号管理"
                                                                            HideLabel="true"></ext:Checkbox>
                                                                            <ext:Checkbox ID="Checkbox15" 
                                                                            runat="server"
                                                                            Name="7"
                                                                            Width="90"
                                                                            BoxLabel="系统管理"
                                                                            HideLabel="true">
                                                                            </ext:Checkbox>
                                                                            <ext:Checkbox ID="Checkbox16" 
                                                                            runat="server"
                                                                            Name="8"
                                                                            Width="90"
                                                                            BoxLabel="云桌面"
                                                                            HideLabel="true">
                                                                            </ext:Checkbox>
                                                                            <ext:Checkbox ID="Checkbox17" 
                                                                            runat="server"
                                                                            Name="9"
                                                                            Width="90"
                                                                            BoxLabel="系统帮助"
                                                                            HideLabel="true">
                                                                        </ext:Checkbox>
                                                                        <ext:Checkbox ID="Checkbox18" 
                                                                            runat="server"
                                                                            Name="10"
                                                                            Width="90"
                                                                            BoxLabel="隐藏边栏"
                                                                            HideLabel="true">
                                                                        </ext:Checkbox>
                                                                        </Items>
                                                                        </ext:CheckboxGroup>       
                                                                        <ext:Button ID="Button5" Icon="Add" runat="server" Width="80" OnDirectClick="Button6_Click" 
                                                                        Text="添加" />      
                                                        </Items>
                                                        </ext:Panel>
                                                        </Items>
                                                    </ext:Portlet>
                                                    <ext:Portlet ID="Portlet6" runat="server" Icon="Delete" Title="删除"  Closable="False">
                                                        <Items>
                                                            <ext:GridPanel ID="GridPanel1" runat="server" Frame="true" 
                                                                Title="权限信息">
                                                                <Store>
                                                                    <ext:Store ID="Store9" runat="server">
                                                                        <Model>
                                                                            <ext:Model ID="Model9" runat="server" IDProperty="AclID">
                                                                                <Fields>
                                                                                    <ext:ModelField Name="ObjectName" />
                                                                                    <ext:ModelField Name="SubjectName" />
                                                                                    <ext:ModelField Name="ObjectType" />
                                                                                    <ext:ModelField Name="AclID" />
                                                                                    <ext:ModelField Name="Power" />
                                                                                </Fields>
                                                                            </ext:Model>
                                                                        </Model>
                                                                    </ext:Store>
                                                                </Store>
                                                                <ColumnModel>
                                                                       <Columns>
                                                                             <ext:Column ID="Column9" runat="server" DataIndex="SubjectName" Text="职位名" 
                                                                                                    Width="150" />
                                                                             <ext:Column ID="Column10" runat="server" DataIndex="ObjectName" Text="菜单名" 
                                                                                                    Width="150" />
                                                                              <ext:Column ID="Column12" runat="server" DataIndex="Power" Text="权限" 
                                                                                                    Width="50" />
                                                                       </Columns>
                                                                 </ColumnModel>
                                                                <SelectionModel>
                                                                    <ext:RowSelectionModel ID="RowSelectionModel2" runat="server" Mode="Single" />
                                                                </SelectionModel>
                                                                <BottomBar>
                                                                    <ext:Toolbar ID="Toolbar2" runat="server">
                                                                        <Items>
                                                                            <ext:Button ID="Button6" runat="server" Icon="Accept" OnDirectClick="Button7_Click" 
                                                                                Text="删除选中权限" />
                                                                        </Items>
                                                                    </ext:Toolbar>
                                                                </BottomBar>
                                                            </ext:GridPanel>  
                                                        </Items>
                                                    </ext:Portlet>
                                                </Items>
                                            </ext:PortalColumn>                                  
                                        </Items>
                                    </ext:Portal>
                </Items>
            </ext:Panel>
        </Items>
 </ext:TabPanel>
    </td></tr></table>
</asp:Content>
